<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>oms</title>
    <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon">
    <link href="/static/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/login.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="middle-box text-center loginscreen  animated fadeInDown">
    <div>
        <div>
            <h1 class="logo-name"><img src="/static/images/logo.png"></h1>
        </div>
        {% if error %}
            <div class="alert alert-danger text-center">{{ error }}</div>
        {% endif %}
        <h2>欢迎使用 OMS</h2>
        <form class="m-t" role="form" method="post" action="{% url 'login' %}">
            <div class="form-group">
                <input type="text" name="username" class="form-control" placeholder="用户名" required="length[6~50]">
            </div>
            <div class="form-group">
                <input type="password" name="password" class="form-control" placeholder="密码" required="">
            </div>
            <div>
                <img onclick="this.setAttribute('src','{% url 'captcha' %}?nocache='+Math.random());"
                     src="{% url 'captcha' %}" alt="Captcha" style="display: inline;float: right;cursor:  pointer;"/>
            </div>
            <div class="form-group">
                <input autocomplete="off" id="" class="form-control" name="captcha" type="text" placeholder="验证码"
                       style="width: 45%;">
            </div>
            <button type="submit" class="btn btn-primary block full-width m-b">登 录</button>
            {% if next %}
                <input type='hidden' name='next' value='{{ next }}'>
            {% else %}
                <input type='hidden' name='next' value='{{ next|add:"/" }}'>
            {% endif %}
            <a href="{% url 'password_forget' %}">
                <small>忘记密码?</small>
            </a>
        </form>
        <p class="m-t">
            <small><b>Copyright <a href="https://www.wilean.com">wilean.com</a></b> © 2017-2018</small>
        </p>
    </div>
</div>

<!-- Mainly scripts -->
<script src="/static/js/jquery-2.2.3.min.js"></script>
<script src="/static/js/bootstrap/bootstrap.min.js"></script>

</body>
</html>